Add --message-format flag.
Closes #2982
This adds a `--message-format` flag with values `human` or `json-v1` to commands that may trigger compilation.
After the discussion in the issue I am no longer sure that this is a way to go:
* Looks like it buys nothing compared to `RUST_FLAGS` approach: a flag is more useful on the command line, but from the tool point of view there should be no significant differences between a flag and an environmental variable.
* Looks like we really want to wrap compiler's messages into our own json to tie them to particular compilation.